<?PHP
/* $Id: sync.php 7 2009-03-24 20:25:52Z ronan $ */

//setting the api info (needs to be full director api)
//user id
/*$aid = ;
//api key
$uapi = '';
//character id
$name = ;*/
//include('dirApi.php');
include 'includes/config.php';
include 'includes/database.php';
include 'includes/library.php';

require_once('api/class.api.php');
require_once('api/class.charselect.php');
require_once('api/class.membertrack.php');
require_once('api/class.standings.php');
//echo($directorA->charID);
/** SETUP API ***/
$api = new Api();
$api->setCredentials($directorA->id,$directorA->apiKey,$directorA->charID);
//$api->setCredentials($aid, $uapi, $name);
//$api->setCredentials("userid", "apikey", "charid");
$api->debug(true);
$api->cache(false);
//echo($directorA->charID);
//*** uses the api and key to select the correct character
/*$contents = $api->getCharacters();
$ident = CharSelect::getCharacters($contents);
for($i = 0; $i < 3; $i++)
{
	if($ident[$i]['corpname'] == 'hirr')
	{
		$name = $ident[$i]['charid'];
		//echo($ident[$i]['charname']." was chosen <br />");
	}
}*/
echo("stuff");
$contents2 = $api->getStandings();
echo $contents2;
$ident2 = StandingSelect::getStandings($contents2);
for($i = 0; !empty($ident2[$i]['name']); $i++)
{
	echo("corp ".($i+1).": ".$ident2[$i]['name']." ".$ident2[$i]['standing']."\n");
}


